﻿using System;
using System.Collections.Generic;
using AgileBoard.Domain;

namespace AgileBoard.Demo
{
    public class FakeUserData
    {
        public static List<User> CreateTestUsers()
        {
            var userId = new Guid("2EBDBC36-3585-47b3-8709-BE3184956938");

            var users = new List<User>
                            {
                                DemoManager(),
                                DemoLeadDeveloper(),
                                DemoDeveloper()
                            };

            for (int i = 0; i < 10; i++)
            {
                var sampleUser = new User
                                     {
                                         UserID = userId,
                                         CreateTime = DateTime.Now,
                                         Email = "user@user.com",
                                         Mobile = "9886803882",
                                         Password = "goodPass",
                                         UserName = "someUser"
                                     };

                sampleUser.Role = Role.Developer;
                sampleUser.Project = FakeProjectData.SomeProject();
                //users.Add(sampleUser);
                userId = Guid.NewGuid();
            }

            return users;
        }

        public static User DefaultUser()
        {
            var Default = new User
                              {
                                  UserID = new Guid("29DC7A46-52B5-4941-AAE2-F48592847E42"),
                                  CreateTime = DateTime.Now,
                                  Email = "default@demo.com",
                                  Mobile = "9886803882",
                                  Password = "",
                                  UserName = "default"
                              };

            Default.Role = Role.LeadDeveloper;
            //Default.Project = FakeProjectData.DemoProject();

            return Default;
        }

        public static User AuthenticatedUser()
        {
            var Default = new User
                              {
                                  UserID = new Guid("BE4B0656-8685-439e-B4EA-66D5C9BA7508"),
                                  CreateTime = DateTime.Now,
                                  Email = "default@demo.com",
                                  Mobile = "9886803882",
                                  Password = "goodPass",
                                  UserName = "default"
                              };

            Default.Role = Role.Administrator;
            Default.Project = FakeProjectData.DefaultProject();

            return Default;
        }

        public static User Developer()
        {
            var Default = new User
                              {
                                  UserID = new Guid("47B01645-7C1E-4394-B6FD-E30D95D13F47"),
                                  CreateTime = DateTime.Now,
                                  Email = "default@demo.com",
                                  Mobile = "9886803882",
                                  Password = "",
                                  UserName = "dev"
                              };

            Default.Role = Role.Developer;
            Default.Project = FakeProjectData.SomeProject();

            return Default;
        }

        public static User DemoDeveloper()
        {
            var Default = new User
                              {
                                  UserID = new Guid("BAECFB10-C382-4ec8-BFC6-B85451688B51"),
                                  CreateTime = DateTime.Now,
                                  Email = "default@demo.com",
                                  Mobile = "9886803882",
                                  UserName = "Developer"
                              };

            Default.Role = Role.Developer;
            Default.Project = FakeProjectData.DemoProject();

            FakeFeelingsData.CreateDevFeelings().ForEach(f => Default.AddFeeling(f));

            return Default;
        }

        public static User DemoManager()
        {
            var Default = new User
                              {
                                  UserID = new Guid("0D21139B-2134-49c4-AC2B-082A85FC3706"),
                                  CreateTime = DateTime.Now,
                                  Email = "default@demo.com",
                                  Mobile = "9886803882",
                                  UserName = "LeadDeveloper"
                              };

            Default.Role = Role.Administrator;
            Default.Project = FakeProjectData.DemoProject();

            FakeFeelingsData.CreateManagerFeelings().ForEach(f => Default.AddFeeling(f));

            return Default;
        }

        public static User DemoLeadDeveloper()
        {
            var Default = new User
                              {
                                  UserID = new Guid("B7AA9AE0-B4DA-4576-B88A-8BBE27CE38F6"),
                                  CreateTime = DateTime.Now,
                                  Email = "default@demo.com",
                                  Mobile = "9886803882",
                                  UserName = "Manager"
                              };

            Default.Role = Role.LeadDeveloper;
            Default.Project = FakeProjectData.DemoProject();

            FakeFeelingsData.CreateLeadDevFeelings().ForEach(f => Default.AddFeeling(f));

            return Default;
        }
    }
}